package com.pet.server.ext.action.pet;

import java.util.List;

import com.pet.server.ext.ActionBase;
import com.pet.server.ext.ApiError;
import com.pet.server.ext.BeanToJson;
import com.pet.server.ext.Result;
import com.pet.server.ext.data.PetEvent;
import com.pet.server.ext.service.UserService;
import com.pet.server.ext.util.Parameters;

public class Eventlist extends ActionBase{
	
	public Eventlist(){
		 needCheckAuth =true;
	}
	
	@Override
	public void initParameters(Parameters params) throws ApiError {	
		
	}
	@Override
	public Result invokeService() throws ApiError {
		UserService userService = new UserService();
	    List<PetEvent> list = userService.searchPetEvent(user.user_id);
		Result result = new Result();
		result.put("data",BeanToJson.listTojson(list));
	    return result;
	}
}
